*,
*:after,
*:before {
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
}

.clearfix:before,
.clearfix:after {
	content: '';
	display: table;
}

.clearfix:after {
	clear: both;
}

body {
	font-family: 'Avenir Next', Avenir, 'Helvetica Neue', Helvetica, Arial, sans-serif;
	color: #5d5c56;
	background: #fff;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a {
	text-decoration: none;
	color: #47dbb4;
	outline: none;
}

a:hover,
a:focus {
	color: #33b996;
}

.hidden {
	position: absolute;
	overflow: hidden;
	width: 0;
	height: 0;
	pointer-events: none;
}


/* Canvas container */

.container {
	position: fixed;
	z-index: -1;
	top: 0;
	left: 0;
}


/* Header */

.header {
	position: relative;
	z-index: 1000;
	display: -webkit-flex;
	display: flex;
	-webkit-flex-direction: column;
	flex-direction: column;
	-webkit-justify-content: center;
	justify-content: center;
	-webkit-align-items: center;
	align-items: center;
	height: 100vh;
	min-height: 600px;
	padding: 2em 1em 4em;
	text-align: center;
	color: #fff;
	background: #181922 url(https://drscdn.500px.org/photo/171245921/q%3D80_m%3D2000/bde9883d327a7bb09fbf2db0a826ee65) no-repeat bottom center;
	background-size: cover;
}

.header::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(24, 25, 34, 0.5);
}

.header-title {
	position: relative;
}

.header-title__main {
	font-family: Baskerville, 'Baskerville Old Face', 'Hoefler Text', Garamond, 'Times New Roman', serif;
	font-size: 3em;
	font-weight: 400;
	line-height: 1;
	margin: 0em 0 0.15em 0;
}

.header-title__part {
	font-family: Baskerville, 'Baskerville Old Face', 'Hoefler Text', Garamond, 'Times New Roman', serif;
	font-size: 0.85em;
	font-weight: 400;
	display: block;
	padding: 0.5em 0 2em;
	text-indent: 4px;
	letter-spacing: 4px;
	text-transform: uppercase;
}

.header-title__part::before,
.header-title__part::after {
	content: '\2014';
	padding: 0 0.5em;
}

.header-title__sub {
	font-size: 0.55em;
	font-weight: normal;
	display: block;
	max-width: 700px;
	margin: 0 auto;
	padding: 0.5em 0 1em;
	color: #d1d2d2;
}

.intro {
	font-family: Baskerville, 'Baskerville Old Face', 'Hoefler Text', Garamond, 'Times New Roman', serif;
	font-size: 2em;
	position: relative;
	z-index: 1000;
	display: -webkit-flex;
	display: flex;
	-webkit-flex-direction: column;
	flex-direction: column;
	-webkit-justify-content: center;
	justify-content: center;
	-webkit-align-items: center;
	align-items: center;
	height: 150vh;
	margin: 0 0 3em;
	padding: 3em;
	text-align: center;
	color: #fff;
	/*background: #181922;*/
	background: #181922 url(../img/collage-web-min.png) no-repeat center center;
	background-size: cover;
}

.intro blockquote {
	max-width: 800px;
	position: relative;
	z-index: 99;
	margin: 0 auto;
}

.intro em {
	font-size: 1.5em;
}

.intro span {
	display: block;
	padding: 1em 0;
	color: #464b4b;
}


/* Content */

.content {
	padding: 3em 0;
}


/* Related demos */

.content--related {
	position: relative;
	z-index: 1000;
	padding: 10em 2em;
	text-align: center;
	color: #fff;
	background: #181922;
}

.info {
	font-size: 1.65em;
	padding: 0 0 4em;
}

.media-item {
	display: inline-block;
	padding: 1em;
	vertical-align: top;
	-webkit-transition: color 0.3s;
	transition: color 0.3s;
}

.media-item__img {
	max-width: 100%;
	opacity: 0.6;
	-webkit-transition: opacity 0.3s;
	transition: opacity 0.3s;
}

.media-item:hover .media-item__img,
.media-item:focus .media-item__img {
	opacity: 1;
}

.media-item__title {
	font-size: 1em;
	margin: 0;
	padding: 0.5em;
}


/* Story */

.text {
	position: relative;
	z-index: 1000;
	padding: 5em 3em;
}

.text section {
	font-size: 1.25em;
	line-height: 1.7;
}

.text section h2 {
	font-size: 2.7em;
	font-weight: 400;
	margin: 0;
	text-align: left;
}

.text section:not(:first-child) h2 {
	padding: 2em 0 0 0;
}

.title-up {
	font-size: 0.365em;
	font-weight: bold;
	display: block;
	letter-spacing: 7px;
	text-transform: uppercase;
	color: #cecec5;
}

.title-down {
	font-family: Baskerville, 'Baskerville Old Face', 'Hoefler Text', Garamond, 'Times New Roman', serif;
	font-size: 1.35em;
	font-weight: 400;
	line-height: 0.9;
	display: block;
	padding: 0.15em 0 0.35em;
	color: #5f646c;
}

.text figure {
	margin: 1em 0 2em;
}

.text figure img {
	max-width: 100%;
}

.text figcaption {
	font-size: 0.85em;
	font-style: italic;
	padding: 1em 1.5em 0;
	text-align: center;
	color: #5f646c;
}

.text section p {
	font-size: 0.95em;
	margin: 0.5em 0 1.5em;
}

.text section p.text-intro {
	font-size: 1.3em;
	font-style: italic;
	line-height: 1.5;
	margin: 0.5em 0 1.25em;
	text-align: left;
	color: #9d9c95;
}

.text blockquote {
	font-family: Baskerville, 'Baskerville Old Face', 'Hoefler Text', Garamond, 'Times New Roman', serif;
	font-size: 2em;
	line-height: 1.5;
	position: relative;
	text-align: left;
	color: #939997;
}

.text blockquote::before {
	content: '\201C';
	font-size: 2.5em;
	font-style: italic;
	line-height: 1;
	position: absolute;
	top: -0.15em;
	right: 100%;
	margin: 0 0.075em 0 0;
	color: #f0f3f3;
}

.text blockquote span {
	font-family: 'Avenir Next', Avenir, 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 0.5em;
	white-space: nowrap;
	color: #cbcece;
}

.js-section {
	width: 50%;
	max-width: 700px;
}

.js-gallery {
	padding-top: 50px;
	padding-bottom: 50px;
}

.js-gallery-content {
	font-size: 0;
	text-align: center;
}

.js-gallery-content img {
	max-width: 100%;
	margin: 10px 0;
}

div#popup {
    position: fixed;
    display: none;
    height: 100%;
    width: 100%;
    top: 0;
    background: rgba(0, 0, 0, 0.21);
    z-index: 99999;
}

div#popup .popup-content {
    /*max-height: 500px;
    overflow-y: auto;*/
}

div#popup .popup-body {
    overflow-y: auto;
    max-height: 365px;
}

div#popup .popup-container {    
	margin: 10% auto;
    width: 50%;
    padding: 15px 10px;
    background: #ffffff;
    border-radius: 5px;
    max-height: 500px;
    overflow-y: auto;
    box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.52);
}

div#popup h3 {
	margin: 0px auto;
	font-size: 1.6em;
}

div#popup #close-popup {
	float: right;
    bottom: 15px;
    position: relative;
    left: 5px;
    cursor: pointer;
    font-size: 15px;
}

.fact {
	cursor: pointer;
	color: #47dbb4;
	font-weight: bold;
    font-style: italic;
}

@media(min-width: 721px) and (max-width: 1199px) {
	div#popup .popup-container {
		width: 80%;
	}
}

@media(max-width: 720px) {
	div#popup .popup-container {
		margin: 10% auto;
    	width: 90%;
	}

	.header-title {
		font-size: 1.3em;
	}

	span.header-title__part{
		margin-top: 10px;
		font-size: 14px;
	}
	span.header-title__sub {
		font-size: 12px;
	}
	.header-title__part::before, .header-title__part::after {
		padding: 0 0.3em;
	}

	.intro {
		font-size: 1.25em;
		height: auto;
		padding: 1em;
	}
	.text {
		font-size: 0.85em;
		padding: 2em;
		text-align: justify;
	}
	.text section h2 {
		font-size: 1.85em;
	}
	.text blockquote {
		font-size: 1.45em;
	}
	.js-section {
		width: 100%;
		max-width: none;
	}
}
